home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 46
/
Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso
/
-serious-
/
misc
/
abackup
/
installation
/
install_abackup
< prev
next >
Wrap
Text File
|
1999-09-06
|
15KB
|
388 lines
;
; Installer script for ABackup installation
; $VER: Install_ABackup v36.4 (21.8.99)
;
;********* Initialisations ****************************************************
;
(set MainDir "")
(set PrefDir "")
(set DefPrefDir "SYS:Prefs")
(set SourceDir "/")
(set XPKSourceDir (tackon SourceDir "libs/compressors"))
(set TmpFile (cat "T:RunABPrefs_" (database "total-mem")))
;
;********* Setup all the messages *********************************************
;
(procedure SetupMessages (
(set DefHelpDir (tackon "HELP:" @language))
(set DefCatalogDir (tackon "LOCALE:Catalogs" @language))
(if (= @language "english")
(
(set #InstallWhat "What do you want to install ?")
(set #InstallChoice1 "Main program")
(set #InstallChoice2 "Preferences program")
(set #InstallChoice3 "Online help")
(set #InstallChoice4 "XPK libraries")
(set #InstallChoice5 "")
(set #SelectMainDir "Select the directory where to copy the Main program.")
(set #CopyingMainProg "Copying the Main program...")
(set #SelectPrefDir "Select the directory where to copy the Prefs program.")
(set #BadPrefDir "Sorry, the Main program and the Prefs program can't be installed in the same directory !")
(set #CopyingPrefProg "Copying the Prefs program...")
(set #UpdateMainTT1 "Updating the %s tooltype of the Main program...")
(set #UpdateMainTT2 "Don't forget to update the %s tooltype of the Main program.")
(set #UpdateMainTTH1 "This will allow the Main program to call the Prefs program.")
(set #UpdateMainTTH2 "This will allow the Main program to find the help file.")
(set #UpdatePrefTT1 "Updating the %s tooltype of the Prefs program...")
(set #UpdatePrefTT2 "Don't forget to update the %s tooltype of the Prefs program.")
(set #UpdatePrefTTH2 "This will allow the Prefs program to find the help file.")
(set #SelectHelpDir "Select the directory where to copy online help.")
(set #CopyingHelp "Copying online help...")
(set #SelectXPKDir "Select the directory where to copy XPK libraries.")
(set #CopyingXPK "Copying XPK libraries...")
(set #SelectCatalogDir "Select the directory where to copy the catalog file.")
(set #CopyingCatalog "Copying catalog file...")
(set #RunPrefProg "Run the Pref program.")
(set #RunPrefHelp "This will allow you to setup the ABackup Preferences.")
)
)
(if (= @language "français")
(
(set #InstallWhat "Que voulez-vous installer ?")
(set #InstallChoice1 "Programme principal")
(set #InstallChoice2 "Programme de paramétrage")
(set #InstallChoice3 "Aide en ligne")
(set #InstallChoice4 "Bibliothèques XPK")
(set #InstallChoice5 "Catalogue")
(set #SelectMainDir "Indiquez dans quel répertoire installer le programme principal.")
(set #CopyingMainProg "Copie du programme principal...")
(set #SelectPrefDir "Indiquez dans quel répertoire installer le programme de paramétrage.")
(set #BadPrefDir "Désolé, le programme principal et le programme de paramétrage ne peuvent être installés dans le même répertoire !")
(set #CopyingPrefProg "Copie du programme de paramétrage...")
(set #UpdateMainTT1 "Mise à jour du type d'outil %s du programme principal...")
(set #UpdateMainTT2 "N'oubliez pas de mettre à jour le type d'outil %s du programme principal.")
(set #UpdateMainTTH1 "Ceci permettra au programme principal d'appeller le programme de paramétrage.")
(set #UpdateMainTTH2 "Ceci permettra au programme principal de trouver le fichier d'aide.")
(set #UpdatePrefTT1 "Mise à jour du type d'outil %s du programme de paramétrage...")
(set #UpdatePrefTT2 "N'oubliez pas de mettre à jour le type d'outil %s du programme de paramétrage.")
(set #UpdatePrefTTH2 "Ceci permettra au programme de paramétrage de trouver le fichier d'aide.")
(set #SelectHelpDir "Indiquez dans quel répertoire installer les fichiers d'aide.")
(set #CopyingHelp "Copie des fichiers d'aide...")
(set #SelectXPKDir "Indiquez dans quel répertoire installer les bibliothèques XPK.")
(set #CopyingXPK "Copie des bibliothèques XPK...")
(set #SelectCatalogDir "Indiquez dans quel répertoire installer le fichier catalogue.")
(set #CopyingCatalog "Copie du fichier catalogue...")
(set #RunPrefProg "Appel du programme de paramétrage.")
(set #RunPrefHelp "Ceci vous permettra de paramétrer ABackup.")
)
)
(if (= @language "deutsch")
(
(set #InstallWhat "Was möchten Sie installieren ?")
(set #InstallChoice1 "Hauptprogramm")
(set #InstallChoice2 "Voreinstellungsprogramm")
(set #InstallChoice3 "Online Hilfe")
(set #InstallChoice4 "XPK Libraries")
(set #InstallChoice5 "Katalog")
(set #SelectMainDir "Wählen Sie das Verzeichnis für das Hauptprogramm.")
(set #CopyingMainProg "Kopiere das Hauptprogramm...")
(set #SelectPrefDir "Wählen Sie das Verzeichnis für das Voreinstellungsprogramm.")
(set #BadPrefDir "Sorry, Hauptprogramm und Voreinstellungsprogramm dürfen nicht in das selbe Verzeichnis !")
(set #CopyingPrefProg "Kopiere das Voreinstellungsprogramm...")
(set #UpdateMainTT1 "Aktualisiere das %s Merkmal des Hauptprogramms...")
(set #UpdateMainTT2 "Vergessen Sie nicht das %s Merkmal des Hauptprogramms zu aktualisieren.")
(set #UpdateMainTTH1 "Dies erlaubt dem Hauptprogramm den Aufruf des Voreinstellungsprogramms.")
(set #UpdateMainTTH2 "Dies erlaubt dem Hauptprogramm die Hilfe-Datei zu finden.")
(set #UpdatePrefTT1 "Aktualisiere das %s Merkmal des Voreinstellungsprogramms...")
(set #UpdatePrefTT2 "Vergessen Sie nicht das %s Merkmal des Voreinstellungsprogramms zu aktualisieren.")
(set #UpdatePrefTTH2 "Dies erlaubt dem Voreinstellungsprogramm die Hilfe-Datei zu finden.")
(set #SelectHelpDir "Wählen Sie das Verzeichnis für die Online-Hilfe.")
(set #CopyingHelp "Kopiere die Datei für die Online-Hilfe...")
(set #SelectXPKDir "Wählen Sie das Verzeichnis für die XPK Libraries.")
(set #CopyingXPK "Kopiere die XPK Libraries...")
(set #SelectCatalogDir "Wählen Sie das Verzeichnis für die Katalogdatei.")
(set #CopyingCatalog "Kopiere die Katalogdatei...")
(set #RunPrefProg "Starte das Voreinstellungsprogramm.")
(set #RunPrefHelp "Dies erlaubt Ihnen die Voreinstellungen von ABackup zu ändern.")
)
)
(if (= @language "italiano")
(
(set #InstallWhat "Che cosa vuoi installare ?")
(set #InstallChoice1 "Programma Principale")
(set #InstallChoice2 "Programma Preferenze")
(set #InstallChoice3 "Aiuto in-linea")
(set #InstallChoice4 "Librerie XPK")
(set #InstallChoice5 "Catalogo Italiano")
(set #SelectMainDir "Seleziona la directory dove copiare il Programma Principale.")
(set #CopyingMainProg "Sto copiando il Programma Principale...")
(set #SelectPrefDir "Seleziona la directory dove copiare il Programma Preferenze.")
(set #BadPrefDir "Spiacente, ma il programma Principale e quello delle Preferenze non possono essere installati nella stessa directory !")
(set #CopyingPrefProg "Sto copiando il programma per le Preferenze...")
(set #UpdateMainTT1 "Sto aggiornando il tooltype %s del programma Principale...")
(set #UpdateMainTT2 "Non dimenticare di aggiornare il tooltype %s del programma Principale.")
(set #UpdateMainTTH1 "Questo permetterà al programma Principale di chiamare il programma Preferenze.")
(set #UpdateMainTTH2 "Questo permetterà al programma Principale di trovare il file di aiuto.")
(set #UpdatePrefTT1 "Sto aggiornando il tooltype %s del programma Preferenze...")
(set #UpdatePrefTT2 "Non dimenticare di aggiornare il tooltype %s del programma Preferenze.")
(set #UpdatePrefTTH2 "Questo permetterà al programma Preferenze di trovare il file di aiuto.")
(set #SelectHelpDir "Seleziona la directory dove copiare l'aiuto in-linea.")
(set #CopyingHelp "Sto copiando aiuto in-linea...")
(set #SelectXPKDir "Seleziona la directory dove copiare librerie XPK.")
(set #CopyingXPK "Sto copiando librerie XPK...")
(set #SelectCatalogDir "Seleziona la directory dove copiare il file catalogo.")
(set #CopyingCatalog "Sto copiando il file catalogo...")
(set #RunPrefProg "Eseguo il programma per le Preferenze.")
(set #RunPrefHelp "Questo ti permette di impostare le Preferenze di ABackup.")
)
)
))
;
;********* Install the main program *******************************************
;
(procedure InstallMainProg (
(set MainDir
(askdir
(prompt #SelectMainDir)
(help @askdir-help)
(default "SYS:Utilities")
)
)
(copyfiles
(prompt #CopyingMainprog)
(help @copyfiles-help)
(source (tackon SourceDir ProgName))
(dest MainDir)
(newname "ABackup")
(infos)
)
))
;
;********* Install the Prefs program *******************************************
;
(procedure InstallPrefProg (
(set PrefDir MainDir)
(until (NOT (= PrefDir MainDir)) (
(set PrefDir
(askdir
(prompt #SelectPrefDir)
(help @askdir-help)
(default DefPrefDir)
)
)
(if (= PrefDir MainDir) (message #BadPrefDir))
))
(copyfiles
(prompt #CopyingPrefprog)
(help @copyfiles-help)
(source (tackon SourceDir "Prefs/ABackup"))
(dest PrefDir)
(infos)
)
(if (NOT (= PrefDir DefPrefDir))
(if (BITAND ToInstall 1)
(tooltype
(prompt (#UpdateMainTT1 "PREFSPATH"))
(help #UpdateMainTTH1)
(dest (tackon MainDir "ABackup"))
(settooltype "PREFSPATH" PrefDir)
(confirm)
)
(message (cat (#UpdateMainTT2 "PREFSPATH") #UpdateMainTTH1))
)
)
))
;
;********* Install the help files **********************************************
;
(procedure InstallHelp (
(set HelpDir
(askdir
(prompt #SelectHelpDir)
(help @askdir-help)
(default DefHelpDir)
)
)
(if (= @language "français")
(set SrcHelpDir "français")
(set SrcHelpDir "english")
)
(copyfiles
(prompt #CopyingHelp)
(help @copyfiles-help)
(source (tackon (tackon SourceDir (tackon "ABackup/Docs/" SrcHelpDir)) "ABackup.guide"))
(dest HelpDir)
)
(if (NOT (= HelpDir DefHelpDir))
(if (BITAND ToInstall 1)
(tooltype
(prompt (#UpdateMainTT1 "HELPPPATH"))
(help #UpdateMainTTH2)
(dest (tackon MainDir "ABackup"))
(settooltype "HELPPATH" HelpDir)
(confirm)
)
(message (cat (#UpdateMainTT2 "HELPPPATH") #UpdateMainTTH2))
)
)
(copyfiles
(prompt #CopyingHelp)
(help @copyfiles-help)
(source (tackon (tackon SourceDir (tackon "Prefs/Docs/" SrcHelpDir)) "ABackupPrefs.guide"))
(dest HelpDir)
)
(if (NOT (= HelpDir DefHelpDir))
(if (BITAND ToInstall 2)
(tooltype
(prompt (#UpdatePrefTT1 "HELPPPATH"))
(help #UpdatePrefTTH2)
(dest (tackon PrefDir "ABackup"))
(settooltype "HELPPATH" HelpDir)
(confirm)
)
(message (cat (#UpdatePrefTT2 "HELPPPATH") #UpdatePrefTTH2))
)
)
))
;
;********* Install XPK library ************************************************
;
(procedure InstallXPK (
(set XPKDir
(askdir
(prompt #SelectXPKDir)
(help @askdir-help)
(default "LIBS:")
)
)
(copylib
(prompt #CopyingXPK)
(help @copylib-help)
(source (tackon SourceDir "libs/xpkmaster.library"))
(dest XPKDir)
)
(foreach XPKSourceDir "#?.library"
(copylib
(prompt #CopyingXPK)
(help @copylib-help)
(source (tackon XPKSourceDir @each-name))
(dest (tackon XPKDir "compressors"))
)
)
))
;
;********* Install the catalogs ***********************************************
;
(procedure InstallCatalog (
(set CatalogDir
(askdir
(prompt #SelectCatalogDir)
(help @askdir-help)
(default DefCatalogDir)
)
)
(copyfiles
(prompt #CopyingCatalog)
(help @copyfiles-help)
(source (tackon (tackon (tackon SourceDir "ABackup/Catalogs") @language) "abackup.catalog"))
(dest CatalogDir)
)
(copyfiles
(prompt #CopyingCatalog)
(help @copyfiles-help)
(source (tackon (tackon (tackon SourceDir "Prefs/Catalogs") @language) "abackupprefs.catalog"))
(dest CatalogDir)
)
))
;
;********* Start of the installation program **********************************
;
(complete 0)
(user 2)
(set #InstallWhat "")
;
;********* Setup messages and check language
;
(SetupMessages)
(if (= #InstallWhat "")
(
(set langnum
(askchoice
(prompt "Which language do you speak ?")
(help @askoptions-help)
(choices "deutsch" "english" "français" "italiano")
)
)
(set @language (select langnum "deutsch" "english" "français" "italiano"))
(SetupMessages)
)
)
;
;********* Displays the welcome message
;
(user 0)
(welcome)
;
;********* Ask which part is to be installed
;
(set ToInstall
(askoptions
(prompt #InstallWhat)
(help @askoptions-help)
(if (= #InstallChoice5 "")
(choices #InstallChoice1 #InstallChoice2 #InstallChoice3 #InstallChoice4)
(choices #InstallChoice1 #InstallChoice2 #InstallChoice3 #InstallChoice4 #InstallChoice5)
)
)
)
;
;******** Install each part
;
(complete 15)
(if (BITAND ToInstall 1)
(
(set ProgName "ABackup/ABackup")
(InstallMainProg)
)
)
(complete 30)
(if (BITAND ToInstall 2) (InstallPrefProg))
(complete 45)
(if (BITAND ToInstall 4) (InstallHelp))
(complete 60)
(if (BITAND ToInstall 8) (InstallXPK))
(complete 75)
(if (BITAND ToInstall 16) (InstallCatalog))
(complete 90)
;
;******** Call the Pref program
;
(if (BITAND ToInstall 4)
(
(textfile
(dest TmpFile)
(append (cat "Run <NIL: >NIL: " (tackon PrefDir "ABackup")))
)
(execute
(TmpFile)
(prompt #RunPrefProg)
(help #RunPrefHelp)
(confirm)
)
(delete TmpFile)
)
)
;
;******** End
;
(if (= MainDir "")
(set @default-dest PrefDir)
(set @default-dest MainDir)
)
(complete 100)
;